load("@rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "archiveserver",
    srcs = [
        "archiveserver.go",
        "encode.go",
        "request.go",
    ],
    importpath = "github.com/pachyderm/pachyderm/v2/src/internal/archiveserver",
    visibility = ["//src:__subpackages__"],
    deps = [
        "//src/internal/client",
        "//src/internal/errors",
        "//src/internal/log",
        "//src/internal/meters",
        "//src/internal/middleware/auth/httpauth",
        "//src/internal/uuid",
        "//src/pfs",
        "@com_github_docker_go_units//:go-units",
        "@com_github_klauspost_compress//zstd",
        "@org_uber_go_zap//:zap",
    ],
)

go_test(
    name = "archiveserver_test",
    size = "small",
    srcs = [
        "archiveserver_test.go",
        "encode_test.go",
        "request_test.go",
    ],
    embed = [":archiveserver"],
    deps = [
        "//src/internal/client",
        "//src/internal/errors",
        "//src/internal/log",
        "//src/internal/pctx",
        "//src/pfs",
        "@com_github_google_go_cmp//cmp",
        "@org_golang_google_grpc//:grpc",
        "@org_golang_google_protobuf//testing/protocmp",
        "@org_golang_google_protobuf//types/known/wrapperspb",
    ],
)
